var myMixin = {
    data: {
        isRequest:false,//是否在请求
        isRefesh: false,//下拉刷新
        last_page: 1,//最后一页
        current_page: 0,//当前页
        loading: false//是否加载
    },
    computed: {
        noMore() {
            return this.last_page == this.current_page;
        },
        disabled() {
            return this.loading || this.noMore;
        }
    },
    methods: {
        //加载更多
        // 加载更多
        scrollToEnd() {
            console.log("enter end")
            if (this.noMore) {
                return;
            }
            this.loading = true;
            this._api()
        },
    },
    //加载更多
    // 加载更多
    onReachBottom() {
        console.log("enter end")
        if (this.noMore) {
            return;
        }
        this.loading = true;
        this._api()
    },
}

export default myMixin